# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-testrunner
pkgver=6.2
pkgrel=1
pkgdesc="Zope testrunner script"
arch=('any')
url="https://github.com/zopefoundation/zope.testrunner"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface' 'python-zope-exceptions')
checkdepends=('python-zope-testing')
source=("https://github.com/zopefoundation/zope.testrunner/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('a40f97d4cc33ff8773a842357a56687b500ab8cdd6384dead47219cba7e5c47dbb0ab2a932f37d3401a5b423eca68db15080779b35bcccc391b99cf83f54aff1')

build() {
  cd zope.testrunner-$pkgver
  python setup.py build
}

check() {
  cd zope.testrunner-$pkgver
  python -m venv "$srcdir/pyvenv" --system-site-packages
  (
    . "$srcdir/pyvenv/bin/activate"
    python setup.py develop
    python setup.py test
  )
}

package() {
  cd zope.testrunner-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
